import axios from '../http';

export function create(data) {
	return axios({
		url: 'certificate/add',
		method: 'post',
		data: {
			'name': data.name,
			'phone': data.phone,
			'e_mail': data.email,
			'code': data.id_code,
			'type_id': data.id_code_type,
		},
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}

export function show() {
	return axios({
		url: 'certificate/show',
		method: 'get',
		data: {},
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}

export function remove(id) {
	return axios({
		url: 'certificate/dell',
		method: 'post',
		data: {
			'certificate_id': id
		},
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}